using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class EnemyInSound : MonoBehaviour
{
    public AudioClip a1;
    public AudioClip a2;

    private int cnt = 1;

    

    public void Play()
    {
        
        if (cnt <= 3)
        {
            GetComponent<AudioSource>().clip = a1;
        }
        else
        {
            GetComponent<AudioSource>().clip = a2;
            cnt = 0;
        }
        GetComponent<AudioSource>().Play();
        
        cnt++;
        
    }
}
